package com.liu.service.impl;

import com.liu.entity.Information;
import com.liu.mapper.InformationMapper;
import com.liu.service.InformationService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Information)表服务实现类
 *
 * @author makejava
 * @since 2023-02-09 10:08:47
 */
@Service("informationServiceImpl")
@Transactional
public class InformationServiceImpl implements InformationService {
    @Resource
    private InformationMapper informationMapper;

    @Override
    public Information queryById(Integer id) {
        return this.informationMapper.queryById(id);
    }

    @Override
    public List<Information> findAll(String title) {
        return this.informationMapper.findAll(title);
    }

    @Override
    public List<Information> queryAllByLimit(Integer pageNum, Integer pageSize, String title, String author) {
        return this.informationMapper.queryAllByLimit(pageNum,pageSize,title,author);
    }

    @Override
    public long count(String title, String author) {
        return this.informationMapper.count(title,author);
    }

    @Override
    public int insert(Information information) {
        return this.informationMapper.insert(information);
    }

    @Override
    public int insertBatch(List<Information> entities) {
        return this.informationMapper.insertBatch(entities);
    }

    @Override
    public int update(Information information) {
        return this.informationMapper.update(information);
    }

    @Override
    public int deleteById(Integer id) {
        return this.informationMapper.deleteById(id);
    }

    @Override
    public int deleteByIds(List<Integer> ids) {
        return this.informationMapper.deleteByIds(ids);
    }
}
